\hypertarget{vetor_8cpp_source}{\section{vetor.\-cpp}
}

\begin{DoxyCode}
00001 
00008 \textcolor{preprocessor}{#include "\hyperlink{vetor_8hpp}{vetor.hpp}"}
00009 
\hypertarget{vetor_8cpp_source_l00010}{}\hyperlink{classvetor_a6c0f925ad7cc531beda9f55fc6b713df}{00010} \hyperlink{classvetor_a6c0f925ad7cc531beda9f55fc6b713df}{vetor::vetor}()      \{\} 
00011 
\hypertarget{vetor_8cpp_source_l00012}{}\hyperlink{classvetor_ade1e8ff349d54e2750a8b527edc304f3}{00012} \hyperlink{classvetor_ade1e8ff349d54e2750a8b527edc304f3}{vetor::~vetor}()     \{\} 
00013 
\hypertarget{vetor_8cpp_source_l00014}{}\hyperlink{classvetor_add368c9cbf150cf9f9fa62a634e5bc31}{00014} \hyperlink{classvetor_a6c0f925ad7cc531beda9f55fc6b713df}{vetor::vetor}(\textcolor{keywordtype}{int} dd)\{   \hyperlink{classvetor_a8363ac8288f5c414e85dee6a5806c639}{dim} = dd;    \}
00015 
\hypertarget{vetor_8cpp_source_l00016}{}\hyperlink{classvetor_ab13e103a27577db91c2c3926529faaa1}{00016} \hyperlink{classvetor_a6c0f925ad7cc531beda9f55fc6b713df}{vetor::vetor}(\textcolor{keywordtype}{int} dd, \textcolor{keywordtype}{char} ff)   \{    \hyperlink{classvetor_a8363ac8288f5c414e85dee6a5806c639}{dim} = dd;    \hyperlink{classvetor_a2bdb0bdaffb69a3a36b19aa78971ee5d}{v}.resize(\hyperlink{classvetor_a8363ac8288f5c414e85dee6a5806c639}{dim});    \hyperlink{classvetor_abaeb7b1ae52ac295a6aeefcdb0110685}{f} = ff;    
       \}
\hypertarget{vetor_8cpp_source_l00021}{}\hyperlink{classvetor_a7114966aab8ae32ad0224470e548623a}{00021} \hyperlink{classvetor_a6c0f925ad7cc531beda9f55fc6b713df}{vetor::vetor}(\textcolor{keywordtype}{double}* vv, \textcolor{keywordtype}{int} dd, \textcolor{keywordtype}{char} ff)
00022 \{
00023     \hyperlink{classvetor_a8363ac8288f5c414e85dee6a5806c639}{dim} = dd;    \hyperlink{classvetor_a2bdb0bdaffb69a3a36b19aa78971ee5d}{v}.resize(\hyperlink{classvetor_a8363ac8288f5c414e85dee6a5806c639}{dim});    \hyperlink{classvetor_abaeb7b1ae52ac295a6aeefcdb0110685}{f} = ff;
00024 
00025     \textcolor{keywordflow}{for}(\textcolor{keywordtype}{signed} \textcolor{keywordtype}{int} i = 0; i < \hyperlink{classvetor_a8363ac8288f5c414e85dee6a5806c639}{dim}; i++)
00026         \hyperlink{classvetor_a2bdb0bdaffb69a3a36b19aa78971ee5d}{v}[i] = vv[i];
00027 \}
\hypertarget{vetor_8cpp_source_l00033}{}\hyperlink{classvetor_a759830bac394aa51ce639136ff04bedc}{00033} \hyperlink{classvetor_a6c0f925ad7cc531beda9f55fc6b713df}{vetor::vetor}(valarray <double> vv, \textcolor{keywordtype}{char} ff)     \{  \hyperlink{classvetor_a8363ac8288f5c414e85dee6a5806c639}{dim} = vv.size();  \hyperlink{classvetor_a2bdb0bdaffb69a3a36b19aa78971ee5d}{v} = vv;  \hyperlink{classvetor_abaeb7b1ae52ac295a6aeefcdb0110685}{f}
       = ff;   \}
\hypertarget{vetor_8cpp_source_l00039}{}\hyperlink{classvetor_a7fdb37c78d791c923e4b66e0cd2b5b4d}{00039} \hyperlink{classvetor_a6c0f925ad7cc531beda9f55fc6b713df}{vetor::vetor}(\textcolor{keyword}{const} \hyperlink{classvetor}{vetor} &q)    \{    \hyperlink{classvetor_a8363ac8288f5c414e85dee6a5806c639}{dim} = q.\hyperlink{classvetor_a8363ac8288f5c414e85dee6a5806c639}{dim};    \hyperlink{classvetor_abaeb7b1ae52ac295a6aeefcdb0110685}{f} = q.\hyperlink{classvetor_abaeb7b1ae52ac295a6aeefcdb0110685}{f};      \hyperlink{classvetor_a2bdb0bdaffb69a3a36b19aa78971ee5d}{v} = q.\hyperlink{classvetor_a2bdb0bdaffb69a3a36b19aa78971ee5d}{v};   \}
\hypertarget{vetor_8cpp_source_l00043}{}\hyperlink{classvetor_aeb089eac0b9cc9dbff35ab065cea2fb1}{00043} \textcolor{keywordtype}{void} \hyperlink{classvetor_aeb089eac0b9cc9dbff35ab065cea2fb1}{vetor::show}()
00044 \{
00045     \textcolor{keywordflow}{if}((\hyperlink{classvetor_abaeb7b1ae52ac295a6aeefcdb0110685}{f} ==\textcolor{charliteral}{'l'}) || (\hyperlink{classvetor_abaeb7b1ae52ac295a6aeefcdb0110685}{f} ==\textcolor{charliteral}{'L'}))
00046     \{
00047         \textcolor{keywordflow}{for}(\textcolor{keywordtype}{signed} \textcolor{keywordtype}{int} i = 0; i < \hyperlink{classvetor_a8363ac8288f5c414e85dee6a5806c639}{dim}; i++)
00048             \hyperlink{vetor_8hpp_ad8038912ca53f3415505004c16fa4a6d}{scout} << \hyperlink{classvetor_a2bdb0bdaffb69a3a36b19aa78971ee5d}{v}[i] << \textcolor{stringliteral}{"\(\backslash\)t"};
00049             cout << endl;
00050     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if}((\hyperlink{classvetor_abaeb7b1ae52ac295a6aeefcdb0110685}{f} ==\textcolor{charliteral}{'c'}) || (\hyperlink{classvetor_abaeb7b1ae52ac295a6aeefcdb0110685}{f} ==\textcolor{charliteral}{'C'}))
00051     \{
00052         \textcolor{keywordflow}{for}(\textcolor{keywordtype}{signed} \textcolor{keywordtype}{int} i = 0; i < \hyperlink{classvetor_a8363ac8288f5c414e85dee6a5806c639}{dim}; i++)
00053             \hyperlink{vetor_8hpp_ad8038912ca53f3415505004c16fa4a6d}{scout} << \hyperlink{classvetor_a2bdb0bdaffb69a3a36b19aa78971ee5d}{v}[i] << endl;
00054     \}
00055 \}
00056 
\hypertarget{vetor_8cpp_source_l00057}{}\hyperlink{classvetor_a5f5b99e22611a7122a0df85735d29d16}{00057} \textcolor{keywordtype}{void} \hyperlink{classvetor_a5f5b99e22611a7122a0df85735d29d16}{vetor::set}(\textcolor{keywordtype}{int} dd, \textcolor{keywordtype}{char} ff)
00058 \{
00059     \hyperlink{classvetor_a8363ac8288f5c414e85dee6a5806c639}{dim} = dd;
00060     \hyperlink{classvetor_a2bdb0bdaffb69a3a36b19aa78971ee5d}{v}.resize(\hyperlink{classvetor_a8363ac8288f5c414e85dee6a5806c639}{dim});
00061     \hyperlink{classvetor_abaeb7b1ae52ac295a6aeefcdb0110685}{f} = ff;
00062 
00063     \textcolor{keywordflow}{for}(\textcolor{keywordtype}{signed} \textcolor{keywordtype}{int} i = 0; i < \hyperlink{classvetor_a8363ac8288f5c414e85dee6a5806c639}{dim}; i++)
00064     \{
00065         cout << \textcolor{stringliteral}{"Insira o "} << i + 1 << \textcolor{stringliteral}{" elemento do vetor: "};
00066         cin >> \hyperlink{classvetor_a2bdb0bdaffb69a3a36b19aa78971ee5d}{v}[i];
00067     \}
00068 \}
\hypertarget{vetor_8cpp_source_l00073}{}\hyperlink{classvetor_a695c3105c889809a09d210e0a8b16e5e}{00073} \textcolor{keywordtype}{double} \hyperlink{classvetor_a695c3105c889809a09d210e0a8b16e5e}{vetor::norma}(\textcolor{keywordtype}{int} w)
00074 \{
00075     \textcolor{keywordtype}{double} ret = 0.0;
00076 
00077     \textcolor{keywordflow}{for}(\textcolor{keywordtype}{signed} \textcolor{keywordtype}{int} i = 0; i < \hyperlink{classvetor_a8363ac8288f5c414e85dee6a5806c639}{dim}; i++)
00078         ret += pow(abs(\hyperlink{classvetor_a2bdb0bdaffb69a3a36b19aa78971ee5d}{v}[i]), w);
00079 
00080     ret = pow(ret, 1.0/w);
00081 
00082     \textcolor{keywordflow}{return} ret;
00083 \}
\hypertarget{vetor_8cpp_source_l00087}{}\hyperlink{classvetor_a6f6ecb4c637752ce4eb280d34d626a54}{00087} \textcolor{keywordtype}{double} \hyperlink{classvetor_a6f6ecb4c637752ce4eb280d34d626a54}{vetor::normaInf}()  \{  \textcolor{keywordtype}{double} ret = 0.0;  valarray <double> m = abs(\hyperlink{classvetor_a2bdb0bdaffb69a3a36b19aa78971ee5d}{v});  
      ret = m.max();  \textcolor{keywordflow}{return} ret;   \}
00088 
\hypertarget{vetor_8cpp_source_l00089}{}\hyperlink{classvetor_a7cb658694fdcc7d9e97a332af4e6156d}{00089} \hyperlink{classvetor}{vetor}& \hyperlink{classvetor_a7cb658694fdcc7d9e97a332af4e6156d}{vetor::operator=}(\textcolor{keyword}{const} \hyperlink{classvetor}{vetor} &c)
00090 \{
00091     \textcolor{keywordflow}{if}(\textcolor{keyword}{this} == &c)
00092     \{
00093         \textcolor{comment}{//}
00094     \}
00095     \textcolor{keywordflow}{else}
00096     \{
00097         \hyperlink{classvetor_a8363ac8288f5c414e85dee6a5806c639}{dim} = c.\hyperlink{classvetor_a8363ac8288f5c414e85dee6a5806c639}{dim};        \hyperlink{classvetor_abaeb7b1ae52ac295a6aeefcdb0110685}{f} = c.\hyperlink{classvetor_abaeb7b1ae52ac295a6aeefcdb0110685}{f};        \hyperlink{classvetor_a2bdb0bdaffb69a3a36b19aa78971ee5d}{v} = c.\hyperlink{classvetor_a2bdb0bdaffb69a3a36b19aa78971ee5d}{v};
00098     \}
00099 
00100     \textcolor{keywordflow}{return} *\textcolor{keyword}{this};
00101 \}
00102 
\hypertarget{vetor_8cpp_source_l00103}{}\hyperlink{classvetor_af9e82bf75f6b7c92305b6867b634bae9}{00103} \hyperlink{classvetor}{vetor} \hyperlink{classvetor_af9e82bf75f6b7c92305b6867b634bae9}{vetor::operator-}()\{    \textcolor{keywordflow}{return} -(*this);   \}
00104 
\hypertarget{vetor_8cpp_source_l00105}{}\hyperlink{classvetor_a6bd7704303d34458431b227a3791560b}{00105} \hyperlink{classvetor}{vetor}& \hyperlink{classvetor_a6bd7704303d34458431b227a3791560b}{vetor::operator+=}(\textcolor{keyword}{const} \hyperlink{classvetor}{vetor}& q)
00106 \{
00107     *\textcolor{keyword}{this} = *\textcolor{keyword}{this} + q;
00108     \textcolor{keywordflow}{return} *\textcolor{keyword}{this};
00109 \}
00110 
\hypertarget{vetor_8cpp_source_l00111}{}\hyperlink{vetor_8hpp_a6a4e0f27a5b799ef1cd48281e1e464d6}{00111} \hyperlink{classvetor}{vetor} \hyperlink{matriz_8cpp_a3544289b62615aa0f3e86edfe7f9d376}{operator*}(\textcolor{keywordtype}{double} k, \hyperlink{classvetor}{vetor} vv)
00112 \{
00113     \textcolor{keywordtype}{int} tt = vv.\hyperlink{classvetor_aead9a92bb6204813a59b007719b1a318}{retDim}();    valarray<double> temp(tt);
00114 
00115     \textcolor{keywordflow}{for}(\textcolor{keywordtype}{int} i = 0; i < tt; i++)
00116     temp[i] = k*vv(i);
00117 
00118     \hyperlink{classvetor}{vetor} ret(temp, vv.\hyperlink{classvetor_af06d296456d3de83449f108f5c67c34c}{retF}());         \textcolor{keywordflow}{return} ret;
00119 \}
00120 
\hypertarget{vetor_8cpp_source_l00121}{}\hyperlink{vetor_8hpp_a6411facc60ec95de40b8047c7f4cbafa}{00121} \hyperlink{classvetor}{vetor} \hyperlink{matriz_8cpp_a3544289b62615aa0f3e86edfe7f9d376}{operator*}(\hyperlink{classvetor}{vetor} vv, \textcolor{keywordtype}{double} k)     \{   \textcolor{keywordflow}{return} k*vv;    \}
\hypertarget{vetor_8cpp_source_l00125}{}\hyperlink{vetor_8hpp_a398a8c21fff93248b4692971003cde64}{00125} \hyperlink{classvetor}{vetor} \hyperlink{matriz_8cpp_aa97cca9aeb4363cc45c3c086d9f326da}{operator+}(\hyperlink{classvetor}{vetor} a, \hyperlink{classvetor}{vetor} b)
00126 \{
00127     valarray<double> temp;
00128 
00129     \textcolor{keywordflow}{if}(a.\hyperlink{classvetor_aead9a92bb6204813a59b007719b1a318}{retDim}() != b.\hyperlink{classvetor_aead9a92bb6204813a59b007719b1a318}{retDim}())
00130     \{
00131         cerr << \textcolor{stringliteral}{"Erro! Dimensoes incompativeis! \(\backslash\)n"};
00132         abort();
00133     \}
00134     \textcolor{keywordflow}{else}
00135     \{
00136         \textcolor{keywordtype}{int} tt = a.\hyperlink{classvetor_aead9a92bb6204813a59b007719b1a318}{retDim}();        temp.resize(tt);
00137 
00138         \textcolor{keywordflow}{for}(\textcolor{keywordtype}{signed} \textcolor{keywordtype}{int} i = 0; i < tt; i++)
00139             temp[i] = a(i) + b(i);
00140     \}
00141 
00142     \hyperlink{classvetor}{vetor} ret(temp, a.\hyperlink{classvetor_af06d296456d3de83449f108f5c67c34c}{retF}());    \textcolor{keywordflow}{return} ret;
00143 \}
00144 
\hypertarget{vetor_8cpp_source_l00145}{}\hyperlink{vetor_8hpp_a64b4db35963e0531e6b208a4d9b52172}{00145} \hyperlink{classvetor}{vetor} \hyperlink{matriz_8cpp_ab2076375dc2569575f42deefca914361}{operator-}(\hyperlink{classvetor}{vetor} a, \hyperlink{classvetor}{vetor} b)   \{   \textcolor{keywordflow}{return} a +(-b);     \}
00146 
\hypertarget{vetor_8cpp_source_l00147}{}\hyperlink{classvetor_adf230eb7521c13accc45fc0ddca4f13f}{00147} \textcolor{keywordtype}{double}& \hyperlink{classvetor_adf230eb7521c13accc45fc0ddca4f13f}{vetor::operator()}(\textcolor{keywordtype}{int} i)    \{    \textcolor{keywordflow}{return} \hyperlink{classvetor_a2bdb0bdaffb69a3a36b19aa78971ee5d}{v}[i];    \}
00148 
\hypertarget{vetor_8cpp_source_l00149}{}\hyperlink{classvetor_aead9a92bb6204813a59b007719b1a318}{00149} \textcolor{keywordtype}{int} \hyperlink{classvetor_aead9a92bb6204813a59b007719b1a318}{vetor::retDim}()       \{   \textcolor{keywordflow}{return} \hyperlink{classvetor_a8363ac8288f5c414e85dee6a5806c639}{dim};  \}
00150 
\hypertarget{vetor_8cpp_source_l00151}{}\hyperlink{classvetor_af06d296456d3de83449f108f5c67c34c}{00151} \textcolor{keywordtype}{char} \hyperlink{classvetor_af06d296456d3de83449f108f5c67c34c}{vetor::retF}()      \{   \textcolor{keywordflow}{return} \hyperlink{classvetor_abaeb7b1ae52ac295a6aeefcdb0110685}{f};   \}
00152 
\hypertarget{vetor_8cpp_source_l00153}{}\hyperlink{vetor_8hpp_a4d02f31155297e6536d2c2b76f2ee0e8}{00153} \textcolor{keywordtype}{double} \hyperlink{matriz_8hpp_a505bcdc9cebecba7a2796d5768e0e77c}{operator^}(\hyperlink{classvetor}{vetor} a, \hyperlink{classvetor}{vetor} b)
00154 \{
00155     \textcolor{keywordtype}{double} ret = 0.0;
00156 
00157     \textcolor{keywordflow}{if}(a.\hyperlink{classvetor_aead9a92bb6204813a59b007719b1a318}{retDim}() != b.\hyperlink{classvetor_aead9a92bb6204813a59b007719b1a318}{retDim}())
00158     \{
00159         cerr << \textcolor{stringliteral}{"Erro! Dimensoes diferentes! \(\backslash\)n"};
00160         abort();
00161     \}
00162     \textcolor{keywordflow}{else}
00163     \{
00164         \textcolor{keywordtype}{int} p = a.\hyperlink{classvetor_aead9a92bb6204813a59b007719b1a318}{retDim}();
00165         \textcolor{keywordflow}{for}(\textcolor{keywordtype}{signed} \textcolor{keywordtype}{int} i = 0; i < p; i++)
00166             ret += a(i)*b(i);
00167     \}
00168 
00169     \textcolor{keywordflow}{return} ret;
00170 \}
00171 
\hypertarget{vetor_8cpp_source_l00172}{}\hyperlink{vetor_8hpp_afdd318c5b77a88b56b89cb5bc2927967}{00172} \hyperlink{classvetor}{vetor} \hyperlink{matriz_8cpp_a3544289b62615aa0f3e86edfe7f9d376}{operator*}(\hyperlink{classvetor}{vetor} a, \hyperlink{classvetor}{vetor} b)
00173 \{
00174     \hyperlink{classvetor}{vetor} c(3,\textcolor{charliteral}{'c'});
00175 
00176     \textcolor{keywordflow}{if}((a.\hyperlink{classvetor_aead9a92bb6204813a59b007719b1a318}{retDim}() > 3) || (b.\hyperlink{classvetor_aead9a92bb6204813a59b007719b1a318}{retDim}() > 3))
00177     \{
00178         cerr << \textcolor{stringliteral}{"Erro! Dimensao invalida! \(\backslash\)n"};
00179         abort();
00180     \}
00181     \textcolor{keywordflow}{else}
00182     \{
00183         c(0) = a(1)*b(2) - a(2)*b(1);
00184         c(1) = a(2)*b(0) - a(0)*b(2);
00185         c(2) = a(0)*b(1) - a(1)*b(0);
00186     \}
00187 
00188     \textcolor{keywordflow}{return} c;
00189 \}
00190 
\hypertarget{vetor_8cpp_source_l00191}{}\hyperlink{vetor_8hpp_a41dc5b5ce1ea1d4105a9ef5f22a64bd9}{00191} \hyperlink{classvetor}{vetor} \hyperlink{matriz_8cpp_a3544289b62615aa0f3e86edfe7f9d376}{operator*}(\hyperlink{classvetor}{vetor} a, \hyperlink{classmatriz}{matriz} A)
00192 \{
00193     \textcolor{keywordflow}{if}(a.\hyperlink{classvetor_aead9a92bb6204813a59b007719b1a318}{retDim}() != A.\hyperlink{classmatriz_a617a5bebd89b9398754aaa5a7812a823}{retl}())
00194        \{
00195            cerr << \textcolor{stringliteral}{"Erro! Dimensoes incoerentes \(\backslash\)n"};
00196            abort();
00197        \}
00198     \textcolor{keywordtype}{int} ll = a.\hyperlink{classvetor_aead9a92bb6204813a59b007719b1a318}{retDim}();
00199     \textcolor{keywordtype}{int} cc = A.\hyperlink{classmatriz_ae5a5c0e41f9f1e8957b778bbe55b3347}{retc}();
00200 
00201     \hyperlink{classvetor}{vetor} ret(cc, a.\hyperlink{classvetor_af06d296456d3de83449f108f5c67c34c}{retF}());
00202 
00203     \textcolor{keywordflow}{for}(\textcolor{keywordtype}{signed} \textcolor{keywordtype}{int} i = 0; i < ll; i++)
00204         \textcolor{keywordflow}{for}(\textcolor{keywordtype}{signed} \textcolor{keywordtype}{int} j = 0; j < cc; j++)
00205             ret(j) += A(i,j)*a(i);
00206 
00207     \textcolor{keywordflow}{return} ret;
00208 \}
00209 
\hypertarget{vetor_8cpp_source_l00210}{}\hyperlink{vetor_8hpp_a9f97e45f1e8b21699425ff5024df468b}{00210} \hyperlink{classvetor}{vetor} \hyperlink{matriz_8cpp_a3544289b62615aa0f3e86edfe7f9d376}{operator*}(\hyperlink{classmatriz}{matriz} A, \hyperlink{classvetor}{vetor} a)
00211 \{
00212     \textcolor{keywordflow}{if}(a.\hyperlink{classvetor_aead9a92bb6204813a59b007719b1a318}{retDim}() != A.\hyperlink{classmatriz_ae5a5c0e41f9f1e8957b778bbe55b3347}{retc}())
00213        \{
00214            cerr << \textcolor{stringliteral}{"Erro! Dimensoes incoerentes \(\backslash\)n"};
00215            abort();
00216        \}
00217     \textcolor{keywordtype}{int} ll = A.\hyperlink{classmatriz_ae5a5c0e41f9f1e8957b778bbe55b3347}{retc}();
00218     \textcolor{keywordtype}{int} cc = a.\hyperlink{classvetor_aead9a92bb6204813a59b007719b1a318}{retDim}();
00219 
00220     \hyperlink{classvetor}{vetor} ret(ll, a.\hyperlink{classvetor_af06d296456d3de83449f108f5c67c34c}{retF}());
00221 
00222     \textcolor{keywordflow}{for}(\textcolor{keywordtype}{signed} \textcolor{keywordtype}{int} i = 0; i < ll; i++)
00223         \textcolor{keywordflow}{for}(\textcolor{keywordtype}{signed} \textcolor{keywordtype}{int} j = 0; j < cc; j++)
00224             ret(i) += A(i,j)*a(j);
00225 
00226     \textcolor{keywordflow}{return} ret;
00227 \}
00228 
\hypertarget{vetor_8cpp_source_l00229}{}\hyperlink{vetor_8hpp_a17bb3c0e53dc4ed62d1db317daf5e6cb}{00229} ostream& \hyperlink{matriz_8hpp_a1a5f1b0f85f140ee7aaaafdbe0324c27}{operator<<}(ostream& os, \hyperlink{classvetor}{vetor} x)
00230 \{
00231     \textcolor{keywordflow}{for}(\textcolor{keywordtype}{signed} \textcolor{keywordtype}{int} i = 0; i < x.\hyperlink{classvetor_aead9a92bb6204813a59b007719b1a318}{retDim}(); i++)
00232         os << x(i) << \textcolor{stringliteral}{"\(\backslash\)t"};
00233 
00234     \textcolor{keywordflow}{return} os;
00235 \}
00236 
00237 
\hypertarget{vetor_8cpp_source_l00238}{}\hyperlink{classvetor_af639bf719300f08199946e555e842686}{00238} \hyperlink{classvetor}{vetor} \hyperlink{classvetor_af639bf719300f08199946e555e842686}{vetor::minivec}(\textcolor{keywordtype}{int} a, \textcolor{keywordtype}{int} b)
00239 \{
00240     \textcolor{keywordflow}{if}(b <= a)
00241     \{
00242         cerr << \textcolor{stringliteral}{"Erro! Indices incompatíveis! \(\backslash\)n"};
00243         abort();
00244     \}
00245 
00246     \textcolor{keywordtype}{int} t = b - a + 1;
00247     \hyperlink{classvetor}{vetor} ret(t, \hyperlink{classvetor_abaeb7b1ae52ac295a6aeefcdb0110685}{f});
00248 
00249     \textcolor{keywordflow}{for}(\textcolor{keywordtype}{signed} \textcolor{keywordtype}{int} i = 0; i < t; i++)
00250         ret(i) = \hyperlink{classvetor_a2bdb0bdaffb69a3a36b19aa78971ee5d}{v}[i + a];
00251 
00252     \textcolor{keywordflow}{return} ret;
00253 \}
\end{DoxyCode}
